<?php

namespace App\Utils\Filter\Admin\User;

use App\Utils\Base\FilterBase;

class AdminUserGroupFilter extends FilterBase {
    public function name ($field, $value) {
        $this->builder->andwhere($field.' like :name')->setParameter('name', '%'.$value.'%');
    }

    public function createdAt ($field, $value) {
        $start = $value.' 00:00:00';
        $end = $value.' 23:59:59';
        $this->builder->andwhere($this->builder->expr()->between($field, "'".$start."'", "'".$end."'"));
    }
}